﻿using System.Diagnostics;
using System;
using System.Runtime.Serialization;
namespace Core.AbstractEntities
{
    /// <summary>
    /// Element of the Pile
    /// </summary>
    [DebuggerDisplay("Value : {Value}, Type : {Type} ")]
    [Serializable]
    //[DataContract]
    public class HpElement
    {
        #region private Members

        private object value;
        
        #endregion private Members

        #region public Members
        /// <summary>
        /// Value of the item
        /// </summary>
        //[DataMember]
        public object Value
        {
            [DebuggerStepThrough] 
            get
            {
                return this.value;
            }
            [DebuggerStepThrough] 
            set
            {
                this.value = value;
                this.Type = this.Value.GetType();
            }
        }
        /// <summary>
        /// Indicates if the element is stored
        /// </summary>
       // [DataMember]
        public bool Stored { get; set; }
        /// <summary>
        /// Name of the variable
        /// </summary>
        //[DataMember]
        public string NomVar { get; set; }
        /// <summary>
        /// Type of the element
        /// </summary>
        //[DataMember]
        public System.Type Type { get; set; }
        #endregion public Members
    }
}
